<%@ include file="/WEB-INF/jsp/include.jsp" %>
<%@ include file="/WEB-INF/jsp/heading.jsp" %>

<html>
  <head><title><fmt:message key="title"/></title></head>
  <body>
    <h1><fmt:message key="heading"/></h1>
    <p><fmt:message key="greeting"/> <c:out value="${model.now}"/></p>
    <h3>Produkte</h3>
    <div style="width:500px; float:left;">
    <c:forEach items="${model.products}" var="prod">
    	<div style="display:block; float:left; width:200px; height:100px; background-color:#ccc; padding:10px; margin-right:10px; margin-bottom:10px;">
      	<b><c:out value="${prod.name}"/></b><br/>
      	&euro; <fmt:formatNumber value="${prod.startPrice}" maxFractionDigits="2"/><br><br>
      <a href="<c:url value="detailProduct.html"><c:param name="id" value="${prod.id}" /></c:url>">Details</a><br><br>
    	</div>
    </c:forEach>
    </div>
    <br>
    <a href="<c:url value="login.html"/>">Anmelden</a><br/>
    <a href="<c:url value="newUser.html"/>">Registrieren</a>
    <br>
  </body>
</html>